<?php
class FormularioRecomendar extends sfForm
{
	public function configure()
	{
		$this->setWidgets(array(
      'id'    => new sfWidgetFormInputHidden(),
		  'nombre'    => new sfWidgetFormInput(),
      'email1'    => new sfWidgetFormInput(),
      'email2'=> new sfWidgetFormInput(),
		));
		//$this->setDefault('color','0');
		$this->widgetSchema->setLabel('email1','Tu E-mail');
		$this->widgetSchema->setLabel('email2','Enviar a');
		$this->widgetSchema->setLabel('nombre','Tu Nombre');
		$this->widgetSchema->setNameFormat('datos[%s]');
    //$this->widgetSchema->setFormFormatterName('table');

		$this->setValidators(array(
      'id'=> new sfValidatorString(array('required'=>true)),
      'email1'=> new sfValidatorEmail(array('required'=>true),array('required'=>'Campo Obligatorio','invalid'=>"Email no Valido")),
      'email2'=> new sfValidatorEmail(array('required'=>true),array('required'=>'Campo Obligatorio','invalid'=>"Email no Valido")) ,
      'nombre'=> new sfValidatorString(array('required'=>true), array('min_length'=>5))
		));

	}


}
